﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Faculty.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<fivescomplement.Models.GetQuestionsAdmin_Result  >>"%>

<asp:Content ID="Content3" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">

        <% using (Html.BeginForm()) { %>
                <fieldset>
                    <% int InstitutionID;%>
                    <% InstitutionID = 0; %>
                    <table id="table1">
                        <tr>
                            <th></th>
                            <th></th>
                            <th></th>
                        </tr>
                    <% int test;%>
                    <% test = 0;%>

                    <% foreach (var item in Model)
                       { %>
                        <tr>
                            <td width="300">
                            <%: Html.Hidden("QuestionTypeID" + test.ToString(), item.QuestionTypeID)%>
                            <%: Html.Hidden("QuestionID" + test.ToString(), item.QuestionID)%>
                            <%: item.Question%>
                            </td>

                            <td width="380">
                                 <% if (item.QuestionTypeID == 1)
                                    { %> 
                                    <%: Html.RadioButton("5Scale" + test.ToString(), 5, false)%> Excellent
                                    <%: Html.RadioButton("5Scale" + test.ToString(), 4, false)%> Very Good
                                    <%: Html.RadioButton("5Scale" + test.ToString(), 3, false)%> Fair
                                    <%: Html.RadioButton("5Scale" + test.ToString(), 2, false)%> Poor
                                    <%: Html.RadioButton("5Scale" + test.ToString(), 1, false)%> Very Poor
                                
                                <% } %>

                                <% if (item.QuestionTypeID == 2)
                                   { %> 
                                    <%: Html.RadioButton("T/F" + test.ToString(), 0, false)%> False    
                                    <%: Html.RadioButton("T/F" + test.ToString(), 1, false)%> True
                                <% } %>

                                <% if (item.QuestionTypeID == 3)
                                   { %>
                                        <br />
                                        <br />
                                        </td>
                                        </tr>
                                    </table>
                                    <table>
                                    <tr>
                                    <td>
                                    <%: Html.TextArea("Comments" + test.ToString(), null, new { @cols = "70", @rows = "6" })%>
                                <% } %>
                                <% test += 1;%>
                                <% InstitutionID = item.InstitutionID; %>
                            </td>
                            <td>
                                <%: Html.ActionLink("Delete", "Delete", new { id = item.InstitutionID, id2 = item.QuestionID })%>
                                
                            </td>
                        </tr>
    
                    <% } %>

                    </table>

                    <p>
                        <%: Html.ActionLink("Pick From Question Set", "Questions", new { id = InstitutionID })%>
                    </P>
                    <p>
                        <%: Html.ActionLink("Create New Question", "Create", new { id = InstitutionID })%>
                    </p>

                </fieldset>
        <% } %>
</asp:Content>
